package com.wenjie.original.entity.vo.Order;

import cn.hutool.json.JSONArray;
import com.wenjie.original.entity.Order;
import com.wenjie.original.entity.common.vo.IAddVo;
import com.wenjie.original.entity.common.vo.IUpVo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

public class OrderUpOrAddVo {

    @Data
    public static class UpVo extends baseVo implements IUpVo<Order> {

        @NotNull
        @ApiModelProperty("订单主键")
        private Long orderId;

        @NotNull
        @ApiModelProperty("订单所属客户id")
        private Long userId;

        @NotNull
        @ApiModelProperty("订单所属商品id")
        private Long skuId;

        @NotBlank
        @ApiModelProperty("订单的标识")
        private String orderKey;

        @NotBlank
        @ApiModelProperty("订单名称")
        private String orderName;

        @NotNull
        @ApiModelProperty("订单数量")
        private Integer orderNum;


        @NotNull
        @ApiModelProperty("打包计划")
        private JSONArray orderBoxs;


    }

    @Data
    public static class AddVo extends baseVo implements IAddVo<Order> {

        @Null
        @ApiModelProperty("订单主键")
        private Long orderId;

        @NotNull
        @ApiModelProperty("订单所属客户id")
        private Long userId;

        @NotNull
        @ApiModelProperty("订单所属商品id")
        private Long skuId;

        @NotBlank
        @ApiModelProperty("订单的标识")
        private String orderKey;

        @NotBlank
        @ApiModelProperty("订单名称")
        private String orderName;

        @NotNull
        @ApiModelProperty("订单数量")
        private Integer orderNum;

        @NotNull
        @ApiModelProperty("打包计划")
        private JSONArray orderBoxs;


    }

    @Data
    private static class baseVo extends Order {

        public void setCreateTime(Long createTime) {
        }

        public void setUpdateTime(Long updateTime) {
        }

        public void setVersion(Long version) {
        }

        public void setDelFlag(Long delFlag) {
        }
    }


}
